<?php
session_start();

require(dirname(__FILE__) . '/config.php');
require(dirname(__FILE__) . '/dora.php');
require(dirname(__FILE__) . '/libs/template.php');

$dora = new Dora($config);

$dora->layout_dir = realpath('.') . '/layouts/';
$dora->template_dir = realpath('.') . '/templates/';

function auth() {
	if( !isset($_SESSION['name']) ) {
		header("Location: login.php");
	}
}

function base_url() {
	return $dora->config['base_url'];
}

function action($name) {
	return ( isset($_POST['action']) && ($_POST['action'] == $name) ) ? true : false;
}

?>